package fr.vincent7894.feedroid.feed.provider;

import java.util.Collection;

import android.os.Handler;

import fr.vincent7894.feedroid.feed.context.FeedContext;
import fr.vincent7894.feedroid.feed.pojo.Feed;
import fr.vincent7894.feedroid.feed.pojo.FeedAlias;

/**
 * Component that is responsible to retrieve all feed from the 
 * target source
 * 
 * The source is wrapped in the FeedAlias object
 * 
 * @author vincent
 *
 */
public interface FeedProvider {
	
	/**
	 * 
	 * Check if this provider known how to retrieve items 
	 * based on this context
	 * 
	 * @param feedContext
	 * @return
	 */
	boolean supports(FeedContext feedContext);
	
	/**
	 * List all feed
	 * 
	 * @param feedAlias
	 * @return
	 */
	Collection<Feed> list(FeedAlias feedAlias, Handler handler); 
}
